FROM {{ namespace }}/{{ image_prefix }}nova-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"

{% block nova_consoleauth_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if install_type == 'binary' %}
    {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}

        {% set nova_consoleauth_packages = [
            'openstack-nova-console'
        ] %}

    {% elif base_distro in ['debian', 'ubuntu'] %}

        {% set nova_consoleauth_packages = [
            'nova-consoleauth',
            'python-memcache'
        ] %}

    {% endif %}

{{ macros.install_packages(nova_consoleauth_packages | customizable("packages")) }}

{% endif %}

{% block nova_consoleauth_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER nova
